package com.erdos.upc.entity;

import com.erdos.common.entity.AbstractEntity;


public class ControlMode extends AbstractEntity {
	
	private int controlCode;
	//全部权限，当前仅有读权限 00001=1 
	private static int allPrivilege = 1;
	//读权限为右起第一位 故 controlMode & （00001 = 1）即可得是否具有读权限
	private static int read = 1;
	
	
	public boolean isReadable(){
		return ((this.controlCode & read)>0)?true:false;
	}
	
	public int getControlCode() {
		return controlCode;
	}
	
	public void setControlCode(int controlCode) {
		this.controlCode = controlCode;
	}

	public static int getAllPrivilege() {
		return allPrivilege;
	}	
 	
}